﻿/*
 * Created by SharpDevelop.
 * User: Intel
 * Date: 14.11.2014
 * Time: 9:46
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using Region.Utils;

namespace Region.Forms
{
  /// <summary>
  /// Description of Test.
  /// </summary>
  public partial class TestForm : Form
  {
    
    public TestForm(Engine engine)
    {
      //
      // The InitializeComponent() call is required for Windows Forms designer support.
      //
      InitializeComponent();
      /*userSelector1.engine = engine;
      var ol = new OtdelList(engine);
      ol.setWhere("TO",false);
      ol.setWhere("Root",false);
      otdelSelector1.engine = engine;
      otdelSelector1.otdelList = ol;   
      otdelSelector1.OtdelID = 16;*/
      var col1 = tableView1.Columns.Add("Col1","Столбец1",10);
      var col2 = tableView1.Columns.Add("Col2","Столбец2",20);
      var col3 = tableView1.Columns.Add("Group","Столбец3",20);
      var col4 = tableView1.Columns.Add("Group2","Столбец3",20);
      tableView1.Group.Add(col3,col4);
      col3.Visible=false;
      col4.Visible=false;
      col2.DelegateType = "CheckBox";
      TableView.RowCollection.Row r;
      r = tableView1.Rows.newRow();      
      r.getCell("Col1").Value = "Row1_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = null;
      r.getCell("Group").Value = "G1";
      r.getCell("Group2").Value = "A";
      r = tableView1.Rows.newRow();
      r.getCell("Col1").Value = "Row2_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = true;
      r.getCell("Group").Value = "G2";
      r.getCell("Group2").Value = "A";
      r = tableView1.Rows.newRow();      
      r.getCell("Col1").Value = "Row3_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = null;
      r.getCell("Group").Value = "G1";
      r.getCell("Group2").Value = "A";
      r = tableView1.Rows.newRow();
      r.getCell("Col1").Value = "Row4_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = true;
      r.getCell("Group").Value = "G2";
      r.getCell("Group2").Value = "A";
      r = tableView1.Rows.newRow();  
      
      r.getCell("Col1").Value = "Row5_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = null;
      r.getCell("Group").Value = "G1";
      r.getCell("Group2").Value = "B";
      r = tableView1.Rows.newRow();
      r.getCell("Col1").Value = "Row6_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = true;
      r.getCell("Group").Value = "G2";
      r.getCell("Group2").Value = "B";
      r = tableView1.Rows.newRow();      
      r.getCell("Col1").Value = "Row7_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = false;
      r.getCell("Group").Value = "G1";
      r.getCell("Group2").Value = "B";
      r = tableView1.Rows.newRow();
      r.getCell("Col1").Value = "Row8_Col1";
      r.getCell("Col1").ReadOnly = true;
      r.getCell("Col2").Value = true;
      r.getCell("Group").Value = "G2";
      r.getCell("Group2").Value = "B";      
      
      //
      // TODO: Add constructor code after the InitializeComponent() call.
      //
    }
    void Button1Click(object sender, EventArgs e)
    {
      tableView1.Columns.Add("Col11","Столбец1.5",15);
    }
    void TextBox1TextChanged(object sender, EventArgs e)
    {
  
    }
  }
}
